<!--
 @description 操作日志详情
 @fileName LogDetailForm.vue
 @author zengqiongying
 @created 2021/09/16 15:16:07
-->
<template>
  <el-dialog
    ref="refDlg"
    v-el-drag-dialog
    title="操作日志详情"
    :visible.sync="dialogShow"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    width="650px"
    @close="closeDialog"
  >
    <div class="mt20 log">
      <el-form size="mini" label-width="80px">
        <el-row>
          <el-col :span="8">
            <el-form-item label="操作时间:">
              {{ detailData.createTime }}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="操作人:">
              {{ detailData.createBy }}
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="操作类型:">
              {{ detailData.operateTypeName }}
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="操作备注:">
              {{ detailData.context }}
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'LogForm',
  props: {
    visible: {
      type: Boolean,
      default: false,
      required: true
    },
    detailData: {
      type: [String, Object],
      default: ''
    }
  },
  data() {
    return {

    }
  },

  computed: {
    dialogShow: {
      get() {
        return this.visible
      },
      set(val) {
        this.$emit('update:visible', val)
      }
    }
  },
  created() {},
  methods: {
    closeDialog() {
      this.dialogShow = false
    }
  }
}
</script>
<style lang='scss' scoped>
  .log {
    overflow: auto;
    max-height: 400px;
  }
  /*滚动条样式*/
  .log::-webkit-scrollbar {
      width: 6px;
  }
  .log::-webkit-scrollbar-thumb {
      border-radius: 4px;
      background: rgba(0,0,0,0.2);
  }
  .log::-webkit-scrollbar-track {
      border-radius: 0;
      background: rgba(0,0,0,0.1);

  }
</style>
